<?php
class test_model extends CI_Model 
{

	function getdata() {
	
		$db = $this->load->database('default', true);
		$query = $db->from('tb_bug')->get();
		
echo $db->last_query();
		
		$rows = $query->result();
		
		return $rows;
	}
}
?>